<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>AbstractController::ViewPaths::ClassMethods</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../../../css/github.css" type="text/css" media="screen" />
<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script>
<script src="../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script>

</head>

<body>     
    <div class="banner">
        
            <span>Ruby on Rails v4.0.0</span><br />
        
        <h1>
            <span class="type">Module</span> 
            AbstractController::ViewPaths::ClassMethods 
            
        </h1>
        <ul class="files">
            
            <li><a href="../../../files/actionpack/lib/abstract_controller/view_paths_rb.html">actionpack/lib/abstract_controller/view_paths.rb</a></li>
            
        </ul>
    </div>
    <div id="bodyContent">
        <div id="content">
  


  


  
  


  


  
    <!-- Method ref -->
    <div class="sectiontitle">Methods</div>
    <dl class="methods">
      
        <dt>A</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="ClassMethods.html#method-i-append_view_path">append_view_path</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>P</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="ClassMethods.html#method-i-parent_prefixes">parent_prefixes</a>,
              </li>
            
              
              <li>
                <a href="ClassMethods.html#method-i-prepend_view_path">prepend_view_path</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>V</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="ClassMethods.html#method-i-view_paths">view_paths</a>,
              </li>
            
              
              <li>
                <a href="ClassMethods.html#method-i-view_paths-3D">view_paths=</a>
              </li>
            
          </ul>
        </dd>
      
    </dl>
  

  



  

    

    

    


    


    <!-- Methods -->
        
      <div class="sectiontitle">Instance Public methods</div>
      
        <div class="method">
          <div class="title method-title" id="method-i-append_view_path">
            
              <b>append_view_path</b>(path)
            
            <a href="ClassMethods.html#method-i-append_view_path" name="method-i-append_view_path" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              <p>Append a path to the list of view paths for this controller.</p>

<h4 id="method-i-append_view_path-label-Parameters">Parameters</h4>
<ul><li>
<p><code>path</code> - If a <a href="../../String.html">String</a> is
provided, it gets converted into the default view path. You may also
provide a custom view path (see ActionView::PathSet for more information)</p>
</li></ul>
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-append_view_path_source')" id="l_method-i-append_view_path_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/ec28c4fb242a9bf0632bb4dac0d0a2d949eab1b3/actionpack/lib/abstract_controller/view_paths.rb#L67" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-append_view_path_source" class="dyn-source">
                <pre><span class="ruby-comment"># File actionpack/lib/abstract_controller/view_paths.rb, line 67</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">append_view_path</span>(<span class="ruby-identifier">path</span>)
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">_view_paths</span> = <span class="ruby-identifier">view_paths</span> <span class="ruby-operator">+</span> <span class="ruby-constant">Array</span>(<span class="ruby-identifier">path</span>)
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-parent_prefixes">
            
              <b>parent_prefixes</b>()
            
            <a href="ClassMethods.html#method-i-parent_prefixes" name="method-i-parent_prefixes" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-parent_prefixes_source')" id="l_method-i-parent_prefixes_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/ec28c4fb242a9bf0632bb4dac0d0a2d949eab1b3/actionpack/lib/abstract_controller/view_paths.rb#L17" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-parent_prefixes_source" class="dyn-source">
                <pre><span class="ruby-comment"># File actionpack/lib/abstract_controller/view_paths.rb, line 17</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">parent_prefixes</span>
  <span class="ruby-ivar">@parent_prefixes</span> <span class="ruby-operator">||=</span> <span class="ruby-keyword">begin</span>
    <span class="ruby-identifier">parent_controller</span> = <span class="ruby-identifier">superclass</span>
    <span class="ruby-identifier">prefixes</span> = []

    <span class="ruby-keyword">until</span> <span class="ruby-identifier">parent_controller</span>.<span class="ruby-identifier">abstract?</span>
      <span class="ruby-identifier">prefixes</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">parent_controller</span>.<span class="ruby-identifier">controller_path</span>
      <span class="ruby-identifier">parent_controller</span> = <span class="ruby-identifier">parent_controller</span>.<span class="ruby-identifier">superclass</span>
    <span class="ruby-keyword">end</span>

    <span class="ruby-identifier">prefixes</span>
  <span class="ruby-keyword">end</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-prepend_view_path">
            
              <b>prepend_view_path</b>(path)
            
            <a href="ClassMethods.html#method-i-prepend_view_path" name="method-i-prepend_view_path" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              <p>Prepend a path to the list of view paths for this controller.</p>

<h4 id="method-i-prepend_view_path-label-Parameters">Parameters</h4>
<ul><li>
<p><code>path</code> - If a <a href="../../String.html">String</a> is
provided, it gets converted into the default view path. You may also
provide a custom view path (see ActionView::PathSet for more information)</p>
</li></ul>
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-prepend_view_path_source')" id="l_method-i-prepend_view_path_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/ec28c4fb242a9bf0632bb4dac0d0a2d949eab1b3/actionpack/lib/abstract_controller/view_paths.rb#L77" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-prepend_view_path_source" class="dyn-source">
                <pre><span class="ruby-comment"># File actionpack/lib/abstract_controller/view_paths.rb, line 77</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">prepend_view_path</span>(<span class="ruby-identifier">path</span>)
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">_view_paths</span> = <span class="ruby-constant">ActionView</span><span class="ruby-operator">::</span><span class="ruby-constant">PathSet</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Array</span>(<span class="ruby-identifier">path</span>) <span class="ruby-operator">+</span> <span class="ruby-identifier">view_paths</span>)
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-view_paths">
            
              <b>view_paths</b>()
            
            <a href="ClassMethods.html#method-i-view_paths" name="method-i-view_paths" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              <p>A list of all of the default view paths for this controller.</p>
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-view_paths_source')" id="l_method-i-view_paths_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/ec28c4fb242a9bf0632bb4dac0d0a2d949eab1b3/actionpack/lib/abstract_controller/view_paths.rb#L82" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-view_paths_source" class="dyn-source">
                <pre><span class="ruby-comment"># File actionpack/lib/abstract_controller/view_paths.rb, line 82</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">view_paths</span>
  <span class="ruby-identifier">_view_paths</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-i-view_paths-3D">
            
              <b>view_paths=</b>(paths)
            
            <a href="ClassMethods.html#method-i-view_paths-3D" name="method-i-view_paths-3D" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              <p>Set the view paths.</p>

<h4 id="method-i-view_paths-3D-label-Parameters">Parameters</h4>
<ul><li>
<p><code>paths</code> - If a PathSet is provided, use that; otherwise, process
the parameter into a PathSet.</p>
</li></ul>
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-i-view_paths-3D_source')" id="l_method-i-view_paths-3D_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/ec28c4fb242a9bf0632bb4dac0d0a2d949eab1b3/actionpack/lib/abstract_controller/view_paths.rb#L91" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-i-view_paths-3D_source" class="dyn-source">
                <pre><span class="ruby-comment"># File actionpack/lib/abstract_controller/view_paths.rb, line 91</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">view_paths=</span>(<span class="ruby-identifier">paths</span>)
  <span class="ruby-keyword">self</span>.<span class="ruby-identifier">_view_paths</span> = <span class="ruby-constant">ActionView</span><span class="ruby-operator">::</span><span class="ruby-constant">PathSet</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">Array</span>(<span class="ruby-identifier">paths</span>))
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
                    </div>

    </div>
  </body>
</html>    